﻿@model MaintenanceModel
@{
    //page title
    ViewBag.Title = T("Admin.System.Maintenance").Text;
    Html.SetActiveMenuItemSystemName("Maintenance");
}
<div class="content-header clearfix">
    <h1 class="pull-left">
        @T("Admin.System.Maintenance")
    </h1>
    <div class="pull-right">
        <i class="fa fa-plus-square"></i>
        @T("Admin.System.Maintenance")
    </div>
</div>

<div class="content">
    <div class="form-horizontal">
        <div class="panel-group">

            <div class="panel panel-default panel-search">
                <div class="panel-body">

                    <form asp-controller="Common" asp-action="Maintenance" method="post">
                        @T("Admin.System.Maintenance.DeleteGuests")
                        <div class="form-group">
                            <div class="col-md-3">
                                <u-label asp-for="DeleteGuests.OlderThan" />
                            </div>
                            <div class="col-md-9">
                                <u-editor asp-for="DeleteGuests.OlderThan" />
                            </div>
                        </div>
                        <input type="submit" name="delete-guests" class="btn bg-red" value="@T("Admin.Common.Delete")" />

                        @if (Model.DeleteGuests.NumberOfDeletedUsers.HasValue)
                        {

                            string.Format(T("Admin.System.Maintenance.DeleteGuests.TotalDeleted").Text, Model.DeleteGuests.NumberOfDeletedUsers.Value);

                        }

                        <p>
                            <br />
                            <hr />
                            <br />
                        </p>


                        @T("Admin.System.Maintenance.DeleteAbandonedCarts")

                        <div class="form-group">
                            <div class="col-md-3">
                                <u-label asp-for="DeleteAbandonedCarts.OlderThan" />
                            </div>
                            <div class="col-md-9">
                                <u-editor asp-for="DeleteAbandonedCarts.OlderThan" />
                            </div>
                        </div>
                        <input type="submit" name="delete-abondoned-carts" class="btn bg-red" value="@T("Admin.Common.Delete")" />
                        @if (Model.DeleteAbandonedCarts.NumberOfDeletedItems.HasValue)
                        {

                        string.Format(T("Admin.System.Maintenance.DeleteAbandonedCarts.TotalDeleted").Text, Model.DeleteAbandonedCarts.NumberOfDeletedItems.Value);

                        }

                        <p>
                            <br />
                            <hr />
                            <br />
                        </p>

                        @T("Admin.System.Maintenance.DeleteExportedFiles")
                        <div class="form-group">
                            <div class="col-md-3">
                                <u-label asp-for="DeleteExportedFiles.StartDate" />
                            </div>
                            <div class="col-md-9">
                                <u-editor asp-for="DeleteExportedFiles.StartDate" />
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                <u-label asp-for="DeleteExportedFiles.EndDate" />
                            </div>
                            <div class="col-md-9">
                                <u-editor asp-for="DeleteExportedFiles.EndDate" />
                            </div>
                        </div>

                        <input type="submit" name="delete-exported-files" class="btn bg-red" value="@T("Admin.Common.Delete")" />

                        @if (Model.DeleteExportedFiles.NumberOfDeletedFiles.HasValue)
                        {
                            string.Format(T("Admin.System.Maintenance.DeleteExportedFiles.TotalDeleted").Text, Model.DeleteExportedFiles.NumberOfDeletedFiles.Value);

                        }
                    </form>
                </div>

            </div>
        </div>
    </div>
</div>